package com.castle.fortress.admin.flowable.dto;

import com.castle.fortress.admin.flowable.form.dto.FlowableFormColDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 流程模板管理表 实体类
 *
 * @author castle
 * @since 2022-09-26
 */
@Data
public class FlowableTemplateDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@JsonProperty("id")
	private Long id;
	@JsonProperty("title")
	private String title;
	@JsonProperty("contentXml")
	private String contentXml;
	@JsonProperty("contextJson")
	private String contextJson;
	@JsonProperty("status")
	private Integer status;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonProperty("createTime")
	private Date createTime;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonProperty("deployTime")
	private Date deployTime;
	@JsonProperty("actKey")
	private String actKey;
	@JsonSerialize(using = ToStringSerializer.class)
	@JsonProperty("formKey")
	private Long formKey;
	@JsonProperty("deployId")
	private String deployId;
	@JsonProperty("engineVersion")
	private String engineVersion;
	@JsonProperty("formName")
	private String formName;
	@JsonProperty("form")
	private List<FlowableFormColDto> form;

}
